package org.formal.system.entity;

import java.util.ArrayList;
import java.util.List;
import javax.persistence.Column;
import javax.persistence.Table;
import javax.persistence.Transient;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.formal.common.base.BaseEntity;

/**
 * 资源表
 * @ClassName PermissionEntity 资源
 * @Description url路径数据
 * @author jiangyan
 * @date 2017-11-14 16:32:47
 * @version 1.0 
 */
@Data
@Table(name = "sys_resource")
@EqualsAndHashCode(callSuper = true)
public class ResourceEntity extends BaseEntity {

	private static final long serialVersionUID = -8209565399024662471L;
	
	/**
	 * 图标名称 
	 */
	@Column(name="ICON_NAME")
	private String iconName;
	
	/**
	 * 菜单编码
	 */
	@Column(name="MENU_NO")
	private String menuNo;
	
	/**
	 * 菜单名称
	 */
	@Column(name="MENU_NAME")
	private String menuName;
	
	/**
	 * 父级ID
	 */
	@Column(name="PARENT_ID")
	private String parentId;
	
	/**
	 * 菜单等级
	 */
	@Column(name="LEVEL")
	private Integer level;
	
	/**
	 * url路径
	 */
	@Column(name="URL")
	private String url;
	
	/**
	 * 是否叶子节点
	 */
	@Column(name="IS_LEAF")
	private Boolean isLeaf;
	
	@Transient
	private List<ResourceEntity> children = new ArrayList<ResourceEntity>();

}